<?php

if( ! defined('DOCROOT') )
{
    require_once '/var/www/advancelab/chilik2/unittest/bootstrap.php';
}

class FilterDefinitionTest extends UnitTestCase
{
    function testingFilterDefinitionTest()
    {
        $struct = new Entity\FilterDefinition();
        
        $this->assertIdentical($struct,new Entity\FilterDefinition);
        $this->assertTrue($struct instanceof Entity\FilterDefinition);
        
        $struct->className = 'php';
        $this->assertEqual( 'php', $struct->className );
        $struct->options = 'cfcomponent';
        $this->assertEqual( 'cfcomponent', $struct->options );
        
        /* $this->dump($struct); */
    }
    
    public function testMockingMethod()
    {
        $state = array(
        'className' => 'php',
        'options' => 'ezc',
        );
        
        $struct = Entity\FilterDefinition::__mock( $state );
        
        $this->assertEqual( 'php', $struct->className );
        $this->assertEqual( 'ezc', $struct->options );
    }
    
}
